<?php
	if($_COOKIE['admin_id'] == false){
		header("Location:login.php");
	}
	require_once 'config/common.php';
	$adminc = new admin();

	$admin_id = $_COOKIE['admin_id'];				//管理员id
	$_admin = $adminc -> getAdminInfo();
	$smarty->assign('_admin',$_admin);	
	
	//当前页面文件名
	$pathinfo = pathinfo($_SERVER['SCRIPT_NAME']);
	$url_params = $_SERVER['QUERY_STRING'];			//参数 字符串
	$url_params = $url_params != ''? '?' . $url_params: '';
	$smarty->assign("url_params",$url_params);
	$page_basename = $pathinfo['basename'];		//带扩展名
	$smarty->assign("page_basename",$page_basename);
	$page_filename = $pathinfo['filename'];		//不带扩展名
	$smarty->assign("page_filename",$page_filename);
?>